﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LuaInterface;
using UnityEngine;

namespace GMBase.Lua
{
    /// <summary>
    /// lua在开发模式下加载。
    /// </summary>
    class LuaLoaderForEditor : LuaFileUtils
    {
        public readonly string LuaRootPath;
        public LuaLoaderForEditor()
        {
            LuaFileUtils.Instance = this;
            LuaRootPath = Application.dataPath + "/Code/Performance/Lua/";
        }

        /// <summary>
        /// 当LuaVM加载Lua文件的时候，这里就会被调用，
        /// 用户可以自定义加载行为，只要返回byte[]即可。
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public override byte[] ReadFile(string fileName)
        {
            return base.ReadFile(fileName);
        }
    }
}
